package com.shengyuan.manage_os.im.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.shengyuan.manage_os.im.common.CCPAppManager;
import com.shengyuan.manage_os.old.ying.erpm.Actual_OA_DaKa_JiDong;
import com.shengyuan.manage_os.old.ying.erpm.LoginActivity;
import com.shengyuan.manage_os.old.ying.erpm.util.Utility;

/**
 * Created by Administrator on 2017/3/13.
 */

public class CompelStartReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (LoginActivity.pmUser == null&&LoginActivity.pmUser.UserName.equals("")) {
            intent.setClass( context, LoginActivity.class );
            context.startActivity(intent);
            Utility.MessageBox("您的账号出现异常，请重新登录");
            return;
        }
        Intent intent1 = new Intent(context, Actual_OA_DaKa_JiDong.class);
        intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent1.putExtra("DengJi","定位");
        context.startActivity(intent1);
    }
}
